<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns='http://www.w3.org/1999/xhtml'>
<head>
	<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
	<title></title>
	<style type='text/css' media='all'>
pre.cppcode
{
	background: #FFFFFF;
	color: #000000;;
	font: 10pt "Lucida Console";
}
.cpp01{
	color: #007F00;
}
.cpp02{
	color: #007F00;
}
.cpp03{
	color: #3F703F;
}
.cpp04{
	color: #007F7F;
}
.cpp05{
	color: #0000EF;
}
.cpp06{
	color: #7F007F;
}
.cpp07{
	color: #7F007F;
}
.cpp08{
	color: #804080;
}
.cpp09{
	color: #7F7F00;
}
.cpp10{
	font-weight: bold;
}
.cpp12{
	background: #E0C0E0;
}
.cpp13{
	background: #E0FFE0;
	color: #007F00;
}
.cpp14{
	background: #E0F0FF;
	color: #3F7F3F;
}
.cpp15{
	color: #3F703F;
}
.cpp16{
	color: #B00040;
}
.cpp17{
	color: #3060A0;
}
.cpp18{
	color: #804020;
}
.cpp32{
}
.cpp34{
	color: #0000EE;
	font-weight: bold;
}
.cpp35{
	color: #EE0000;
	font-weight: bold;
}
.cpp36{
	color: #808080;
}
	</style>
</head>
<body>
<pre class='cppcode'><span class='cpp09'>#include &lt;gamelib/gamelib.h&gt;
</span>
<span class='cpp05'>int</span> main<span class='cpp10'>()</span> <span class='cpp10'>{</span>
    VideoModeSetTitle<span class='cpp10'>(</span><span class='cpp06'>&quot;Simple Example&quot;</span><span class='cpp10'>);</span>
    VideoModeSet<span class='cpp10'>(</span><span class='cpp04'>640</span><span class='cpp10'>,</span> <span class='cpp04'>480</span><span class='cpp10'>,</span> <span class='cpp05'>true</span><span class='cpp10'>);</span>

    <span class='cpp05'>while</span> <span class='cpp10'>(!</span>key<span class='cpp10'>[</span>_esc<span class='cpp10'>])</span> <span class='cpp10'>{</span>
        VideoModeEnable2D<span class='cpp10'>();</span>
        <span class='cpp10'>{</span>
            ColorSet<span class='cpp10'>(</span><span class='cpp04'>0.0f</span><span class='cpp10'>,</span> <span class='cpp04'>0.0f</span><span class='cpp10'>,</span> <span class='cpp04'>0.0f</span><span class='cpp10'>,</span> <span class='cpp04'>0.5f</span><span class='cpp10'>);</span>
            DrawFilledRectangle<span class='cpp10'>(</span><span class='cpp04'>0</span><span class='cpp10'>,</span> <span class='cpp04'>0</span><span class='cpp10'>,</span> screenWidth<span class='cpp10'>,</span> <span class='cpp04'>90</span><span class='cpp10'>);</span>
        <span class='cpp10'>}</span>
        VideoModeDisable2D<span class='cpp10'>();</span>
        VideoModeFrame<span class='cpp10'>();</span>
    <span class='cpp10'>}</span>

    <span class='cpp05'>return</span> <span class='cpp04'>0</span><span class='cpp10'>;</span>
<span class='cpp10'>}</span>
</pre>
</body>
</html>
